<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="#{AuthenticationBean.template}"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich">
    <ui:define name="content">
        <h:form id="menu2">      
        <f:view>
            <h:form>      
                <rich:panel header="Logowanie" style="width:100%; text-align:center;" >
                    <h:panelGrid columns="2" rendered="#{not AuthenticationBean.loggedIn}" style="text-align: center" >
                        <h:outputText value="Login: "/><h:inputText value="#{AuthenticationBean.name}" />
                        <h:outputText value="Hasło: "/><h:inputSecret value="#{AuthenticationBean.pass}" />
                        <h:commandButton value="Zaloguj" action="#{AuthenticationBean.login}" />
                    </h:panelGrid>
                        <h:commandButton value="logout" action="#{AuthenticationBean.logout}" rendered="#{AuthenticationBean.loggedIn}" />
                </rich:panel>
            </h:form>
                
        </f:view>
        </h:form>    
    </ui:define>
</ui:composition>
